package main.java.controller;

import main.java.dao.UserDao;
import main.java.dao.impl.UserDaoImpl;
import main.java.polo.User;

import java.util.Scanner;

public class UserController {

    /**
     * 修改用户信息
     * @return 修改成功返回1，失败返回0
     */
    public static int update() {
        UserDao userDao = new UserDaoImpl();
        System.out.println("请输入您的姓名，学号和手机号");
        Scanner scanner = new Scanner(System.in);
        String userName = scanner.next();
        String userNumber =scanner.next();
        String userPhone =scanner.next();
        User user = new User(null, userName, null, userNumber, userPhone, null);
        return userDao.update(user);
    }



}
